<?php require VIEW_PATH."/header.php";?>
<body>
<link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<div class="hd-menu-list">
    <ul>
        <li class="active"><a href="#">商品管理</a></li>
        <li><a href="{{U('add')}}">添加商品</a></li>
    </ul>
</div>

<table class="hd-table hd-table-list">
    <thead>
    <tr>
        <td class="hd-w50">编号</td>
        <td>商品名称</td>
        <td>上架时间</td>
        <td>栏目</td>
        <td>商品类型</td>
        <td class="hd-w150">操作</td>
    </tr>
    </thead>
    <tbody>
    {{foreach from="$data['data']" value="$v"}}
    <tr>
        <td>{{$v['goods_id']}}</td>
        <td>
        {{if value="$v['thumb_pic']"}}
        <img src="{{$v['thumb_pic']}}" style="width:50px">
        {{endif}}
        {{$v['goods_name']}}</td>
        <td>{{date('Y/m/d',$v['create_at'])}}</td>
        <td>
        <a href="{{U('Admin/Goods/index',array('cat_id'=>$v['cat_id']))}}">{{$v['cat_name']}}
        </a>
        </td>
        <td>#</td>
        <td class="hd-w100">
            <a href="{{U('edit',array('goods_id'=>$v['goods_id']))}}">修改</a> |
            <a href="{{U('Product/index',array('goods_id'=>$v['goods_id']))}}">货品</a> |
            <a href="#">删除</a>
        </td>
    </tr>
    {{endforeach}}
    </tbody>
</table>
<div class="pagination">
    {{$data['page']}}
</div>
</body>
</html>